export const setStyle = (dom, opt) => {
    Object.keys(opt).forEach(key => {
        // eslint-disable-next-line no-param-reassign
        dom.style[key] = opt[key];
    });
};

export const getDefaultContainer = targetDom => {
    const tabs = document.querySelectorAll('.ant-tabs-tabpane');
    const targetTab = Array.from(tabs).find(item => item.contains(targetDom));
    return targetTab ? targetTab.querySelector('div:nth-of-type(2)') : undefined;
};
